<?php 
include '../../../../include/config.php';
$actor = $_GET['actor'];
$q = mysql_query("select * from baby_child_profile_detail where bid = " . $_COOKIE['bid'] . "") or die(mysql_error());
while ($row = mysql_fetch_array($q)) {
    $fid = $row['father_id'];
    $mid = $row['mother_id'];
    break;
}
if ($actor == 'FATHER') {
    $result = mysql_query("select * from salus_user_profile_detail where FK_fa_user_id = $fid ") or die(mysql_error());
} elseif ($actor == 'MOTHER') {
    $result = mysql_query("select * from salus_user_profile_detail where FK_fa_user_id = $mid") or die(mysql_error());
} elseif ($actor == 'CHILD') {
    $result = mysql_query("select * from baby_child_profile_detail where bid = " . $_COOKIE['bid'] . "") or die(mysql_error());
}
while ($row1 = mysql_fetch_array($result)) {
    ?>




<div class="color_blue padding_title">BASIC DATA INFO OF &nbsp; <?php echo $actor; ?></div>
    <div class="padding_5"> <div class="float_left edit_profile">Name</div><div class="display_data_strong"><?php echo $row1['name'] ?>&nbsp;</div><div class="clear"></div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Sur name</div><div  class="display_data_strong"><?php echo $row1['sur_name'] ?>&nbsp;</div><div class="clear"></div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Sex</div><div style="color:#454545;font-size: 12px;font-weight: bold"><?php echo $row1['sex'] ?>&nbsp;</div><div class="clear"></div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Date of birth(yyyy-mm-dd)</div><div  class="display_data_strong"><?php echo $row1['date_of_birth'] ?>&nbsp;</div><div class="clear"></div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Address</div><div class="display_data_strong"><?php echo $row1['address'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Zip Code</div><div  class="display_data_strong"><?php echo $row1['zip_code'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">City</div><div  class="display_data_strong"><?php echo $row1['city'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">District</div><div  class="display_data_strong"><?php echo $row1['district'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Nation</div><div  class="display_data_strong"><?php echo $row1['country'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Home phone nr.</div><div  class="display_data_strong"><?php echo $row1['phone'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Mobile phone nr.</div><div  class="display_data_strong"><?php echo $row1['mobile'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Personal Identification Code</div><div  class="display_data_strong"><?php echo $row1['personal_identification_code'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">National Health Service Pers. Code</div><div  class="display_data_strong"><?php echo $row1['national_health_service_pers_code'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">PIN code</div><div class="display_data_strong" ><?php echo $row1['PIN_code'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">E-mail *</div><div  class="display_data_strong"><?php echo $row1['email'] ?>&nbsp;</div></div>


    <?php
    if ($actor == 'MOTHER') {
        $a = mysql_query("select * from baby_mother_gynac where sr = '" . $_COOKIE['bid'] . "'") or die(mysql_error());
        while ($r1 = mysql_fetch_array($a)) {
            ?>
            <div class="color_blue padding_title">PERSONAL GYNECOLOGIST'S INFO</div>
            <div class="padding_5"> <div class="float_left edit_profile">Dr. Name</div><div class="display_data_strong"><?php echo $r1['g_doctor'] ?>&nbsp;</div><div class="clear"></div></div>
            <div class="padding_5"> <div class="float_left edit_profile">Address</div><div class="display_data_strong"><?php echo $r1['g_address'] ?>&nbsp;</div><div class="clear"></div></div>
            <div class="padding_5"> <div class="float_left edit_profile">Telephone</div><div class="display_data_strong"><?php echo $r1['g_tel'] ?>&nbsp;</div><div class="clear"></div></div>
            <div class="padding_5"> <div class="float_left edit_profile">Mobile</div><div class="display_data_strong"><?php echo $r1['g_mob'] ?>&nbsp;</div><div class="clear"></div></div>

            <?php
        }
    }
    ?>
    <?php ?>
    <!--<div class="color_blue padding_title">ACCESS INFO</div>
    <div class="padding_5"> <div class="float_left edit_profile">User Id</div><div  class="display_data"><b></b></div></div>

    <div class="padding_5"> <div class="float_left edit_profile">Password</div><div  class="display_data">savan&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Password For Edit</div><div  class="display_data">&nbsp;</div></div>-->


    <div class="color_blue padding_title">MORE INFO</div>
    <div class="padding_5"> <div class="float_left edit_profile">Body height in cm.</div><div  class="display_data"><?php echo $row1['height'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Body weight in KG / LBS</div><div  class="display_data"><?php echo $row1['weight'] ?> Kg&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Group</div><div  class="display_data"><?php echo $row1['group'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Religion</div><div  class="display_data"><?php echo $row1['religion'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Private Helath Insurance Company</div><div  class="display_data"><?php echo $row1['private_helath_insurance_company'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Nr. Insurance Agreement</div><div  class="display_data"><?php echo $row1['insurance'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Insurance phone nr.</div><div  class="display_data"><?php echo $row1['phone_insurance'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Name Personal attending Doctor</div><div  class="display_data"><?php echo $row1['name_personal_attending_doctor'] ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Private practice phone nr.</div><div  class="display_data"><?php echo $row1['private_practice_phone_nr']; ?>&nbsp;</div></div>
    <div class="padding_5"> <div class="float_left edit_profile">Mobile phone nr.</div><div  class="display_data"><?php echo $row1['private_practice_phone_nr'] ?>&nbsp;</div></div>


    <?php if ($actor != 'CHILD') { ?>
        <div class="padding_5"> <div class="float_left edit_profile">Marital status </div><div  class="display_data"><?php echo $row1['marital_status'] ?>&nbsp;</div></div>
        <div class="padding_5"> <div class="float_left edit_profile">Nr. Children </div><div  class="display_data"><?php echo $row1['nr_children'] ?>&nbsp;</div></div>
        <div class="color_blue padding_title">HABIT INFO</div>
        <div class="padding_5"> <div class="float_left edit_profile">Do you accept blood transfusions?</div><div  class="display_data"><?php echo $row1['blood_transfusions'] ?>&nbsp;</div>
            <div class="padding_5"> <div class="float_left edit_profile">Do you accept to be reanimated?</div><div  class="display_data"><?php echo $row1['reanimated'] ?>&nbsp;</div></div>
            <div class="padding_5"> <div class="float_left edit_profile">In case of decease you want to be organ donor?</div><div  class="display_data"><?php echo $row1['organ_donor'] ?>&nbsp;</div></div>
            <div class="padding_5"> <div class="float_left edit_profile">Are you blood donor?</div><div  class="display_data"><?php echo $row1['blood_donor'] ?>&nbsp;</div></div>
            <div class="padding_5"> <div class="float_left edit_profile">Smoke</div><div class="float_left display_data"><?php echo $row1['smoke'] ?>&nbsp;</div>
                <div class="clear"></div>
            </div>
            <div class="padding_5"> <div class="float_left edit_profile">Are you heavy drinker?</div><div  class="display_data"><?php echo $row1['heavy_drinker'] ?>&nbsp;</div></div>
            <div class="padding_5"> <div class="float_left edit_profile">Are you on drugs?</div><div  class="display_data"><?php echo $row1['on_drugs'] ?>&nbsp;</div></div>
            <div class="padding_5"> <div class="float_left edit_profile">Are you on a diet?</div><div  class="display_data"><?php echo $row1['hypocaloric'] ?>&nbsp;</div>
            </div>
            <div class="padding_5"> <div class="float_left edit_profile">Alcohol</div><div  class="display_data"><?php echo $row1['alcohol'] ?>&nbsp;</div></div>
            <!--END INCLUDED CONTENT--></div>

        <?php
    }
}
?>